package syncer

import (
	"gluenet/pkg/apis"
	"time"
)

func SyncInfo(c *apis.StorageContext) {
	tk := time.NewTicker(time.Second * 10)
	//c.Logger.Debugf("syncer tree")
	//syncDagLinkerd(c)
	//syncTree(c)
	//syncerTrace(c, 10)
	for {
		select {
		case <-c.Context.Done():
			return
		case <-tk.C:
			//c.Logger.Debugf("syncer tree")
			syncTree(c)
			syncerTrace(c, 10)
			syncDag(c)
			//syncDagLinkerd(c)
		}
	}
}
